package com.zhuang.taiqiu.config;

public class GCmd {


    public enum C2S{
        USER_LOGIN,
        HIT_BALL, //打球同步
        HIT_BALL_COMPLETE, //打完球,球位置同步服务器收到
        INITIATE_CUE_SYNC,
        MATCH_PLAYER,
        MATCH_PLAYER_CANCEL;

        public String getDescription() {
            switch(this) {
                case USER_LOGIN:
                    return "user_login";
                case HIT_BALL:
                    return "hit_ball";
                case HIT_BALL_COMPLETE:
                    return "hit_ball_complete";
                case INITIATE_CUE_SYNC:
                    return "initiate_cue_sync";
                case MATCH_PLAYER:
                    return "match_player";
                case MATCH_PLAYER_CANCEL:
                    return "match_player_cancel";
                default:
                    return null;
            }
        }
    }


    public enum S2C{
        USER_LOGIN_SUCCESS,
        USER_LOGIN_FAIL,
        HIT_BALL_SYNC, //打球同步完成
        REQUEST_CUE_SYNC, //打完球,球位置同步服务器收到
        HIT_BALL_COMPLETE_SYNC,
        REQUEST_CUE_FAIL,
        MATCH_PLAYER_SYNC,
        MATCH_PLAYER_CANCEL_SYNC;

        public String getDescription() {
            switch(this) {
                case USER_LOGIN_SUCCESS:
                    return "user_login_success";
                case USER_LOGIN_FAIL:
                    return "user_login_fail";
                case HIT_BALL_SYNC:
                    return "hit_ball_sync";
                case REQUEST_CUE_SYNC:
                    return "request_cue_sync";
                case HIT_BALL_COMPLETE_SYNC:
                    return "hit_ball_complete_sync";
                case REQUEST_CUE_FAIL:
                    return "request_cue_fail";
                case MATCH_PLAYER_SYNC:
                    return "match_player_sync";
                case MATCH_PLAYER_CANCEL_SYNC:
                    return "match_player_cancel_sync";
                default:
                    return null;
            }
        }
    }


}
